<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>进货分类汇总</title>
	<include file="Public:header" />
	<style type="text/css">
		.input{width:120px;border:1px solid #ccc;padding:2px;}
	</style>
	<script type="text/javascript">
		var actflg="{:C('URL_MODEL')}"=="0"?"&":"?";

		function selectall_todo()
		{
			$("input[name='chk_list']").attr("checked",true);
		}
		function selectall_undo()
		{
			$("input[name='chk_list']").attr("checked",false);
		}
	</script>
</head>
<body class="">
	
	<div class="demo-info space-out-5px">
		<div class="demo-tip icon-tip"></div>
		<div>进货分类汇总</div>
	</div>
	<div class="space-out-5px">
		<div>
		<form id="frm_search" method="post" action="{:U('Purchasing/pur_report')}" style="margin:10px auto 0px 25px;">
		<div style="width:100%; height:25px;">
			<div class="list-t-l w100px" style="text-align:left;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日期(从)：</div>
			<div class="list-t-l w150px"><input type="text" id="mas_fadate1" name="mas_fadate1" class="easyui-datebox input"  editable="false" value="{$mas_fadate1}" /></div>
			<div class="list-t-l w60px" style="text-align:left;">日期(到)：</div>
			<div class="list-t-l w150px"><input type="text" id="mas_fadate2" name="mas_fadate2" class="easyui-datebox input"  editable="false" value="{$mas_fadate2}" /></div>
		</div>
		
		<volist id="filters" name="filters" key="k">
		<div style="width:100%; height:25px;">		
			<div class="list-t-l w100px"><input type="checkbox" id="report[{$k-1}][flg]" name="report[{$k-1}][flg]" value="Y" <if condition="$filters['flg'] eq 'Y'">checked="true"</if> >{$filters.title}</div>
			<div class="list-t-l w150px"><input type="text" id="report[{$k-1}][keywords]" name="report[{$k-1}][keywords]" class="input" value="{$filters.keywords}" /></div>
			<div class="list-t-l">如果不输入 {$filters.title} 的名称，则统计所有 {$filters.title}</div>		
		</div>
		
		<div style="height:3px; clear:both;"></div>
		</volist>		
		
		<div style="width:100%; height:25px;">		
			<div class="list-t-l w100px"></div>
			<div class="list-t-l w150px"><a href="javascript:;" class="easyui-linkbutton" iconCls="icon-search" onclick="$('#frm_search').submit();">开始统计</a></div>
			<div class="list-t-l"></div>		
		</div>
		
		<div style="height:3px; clear:both;"></div>
		
		</form>
		</div>
	</div>
	<div class=" space-out-10px">
	
	<div class="list-title">
		<volist id="col_title" name="col_title" key="k">
			<if condition="$col_title['flg'] eq 'Y'"><div class="list-t-l w110px">{$col_title.title}</div></if>
		</volist>
		<div class="list-t-l w70px">数量</div>
		<div class="list-t-l w70px">金额</div>
		<div class="list-t-l w70px">价税合计</div>
	</div>
	
	<div class="list-box">
	<volist name="datalist" id="datalist">
	<div class="list-body">
		<php>
			foreach($col_value as $col)
			{
				if($col['flg']=='Y')
				{
					echo '<div class="list-t-l w110px">'.$datalist[$col['field']].'</div>';
				}
			
			}
		</php>
		<div class="list-t-l w70px">{$datalist.qty|get_round=###,6}</div>
		<div class="list-t-l w70px">{$datalist.amount1|get_round=###,2}</div>
		<div class="list-t-l w70px">{$datalist.amount2|get_round=###}</div>
	</div>
	</volist>
	</div>
	
	<div class="list-title">
		<div class="list-t-l"></div>
		<div class="list-t-r"></div>
	</div>
	
	
	</div>
	
	<div class="demo-info space-out-5px">
		<div class="demo-tip icon-tip"></div>
		<div class="pages">【<b>总计数量：{$datasum.qty|get_round=###}&nbsp;&nbsp;总计金额：{$datasum.amount1|get_round=###}&nbsp;&nbsp;价税合计：{$datasum.amount2|get_round=###}</b>】&nbsp;{$page}</div>
	</div>
</body>
</html>
